import { Form, Input, message } from 'antd';
import CommonModal from 'components/common/CommonModal';

type PassWordProps = {
    title?: string;
    visible?: boolean;
    setVisible?: (visible: boolean) => void;
    modalProps?: {
        [x: string]: any;
    };
    successCallback?: () => void;
    onSubmit?: (form?: any, callback?: () => void, modalCallback?: () => void) => void;
    close?: () => void;
};

export default function RejectForm(props: PassWordProps) {
    // 新增弹框
    const { visible, title = '初审驳回', modalProps = {}, onSubmit, close } = props;

    return (
        <CommonModal
            title={title}
            width={600}
            styles={{ body: { marginTop: '20px', marginBottom: '20px' } }}
            open={visible}
            formSetting={{ labelCol: { span: 0 }, wrapperCol: { span: 24 } }}
            onSubmit={onSubmit}
            close={close}
            initFormData={{}}
            {...(modalProps || {})}
        >
            <Form.Item name='remark' label='' rules={[{ required: true, message: '请输入驳回原因' }]}>
                <Input.TextArea placeholder='请输入驳回原因' maxLength={150} showCount />
            </Form.Item>
        </CommonModal>
    );
}
